package com.example.jpademo.db.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 市场成交表
 */
@Data
@Entity
@Table(name = "bond_deal")
public class BondDeal implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id", nullable = false)
    private String id;

    @Column(name = "company_id")
    private String companyId;

    /**
     * 交易时间
     */
    @Column(name = "deal_time")
    private Date dealTime;

    /**
     * 买方机构id
     */
    @Column(name = "bid_bank_id")
    private String bidBankId;

    /**
     * 买方机构代码
     */
    @Column(name = "bid_bank_code")
    private String bidBankCode;

    /**
     * 买方机构所在地
     */
    @Column(name = "bid_bank_city")
    private String bidBankCity;

    /**
     * 买方交易员id
     */
    @Column(name = "bid_agent_id")
    private String bidAgentId;

    /**
     * 买方交易员代码
     */
    @Column(name = "bid_agent_code")
    private String bidAgentCode;

    /**
     * 买方经纪人id A
     */
    @Column(name = "bid_broker_id")
    private String bidBrokerId;

    /**
     * 买方经纪人名字 A
     */
    @Column(name = "bid_broker_name")
    private String bidBrokerName;

    /**
     * 买方佣金
     */
    @Column(name = "bid_brokerrage")
    private BigDecimal bidBrokerrage;

    /**
     * bid方是否确认
     */
    @Column(name = "bid_check")
    private Boolean bidCheck;

    /**
     * 卖方机构id
     */
    @Column(name = "ofr_bank_id")
    private String ofrBankId;

    /**
     * 卖方机构代码
     */
    @Column(name = "ofr_bank_code")
    private String ofrBankCode;

    /**
     * 卖方机构所在地
     */
    @Column(name = "ofr_bank_city")
    private String ofrBankCity;

    /**
     * 卖方交易员id
     */
    @Column(name = "ofr_agent_id")
    private String ofrAgentId;

    /**
     * 卖方交易员代码
     */
    @Column(name = "ofr_agent_code")
    private String ofrAgentCode;

    /**
     * 卖方经纪人id A
     */
    @Column(name = "ofr_broker_id")
    private String ofrBrokerId;

    /**
     * 卖方经纪人名字 A
     */
    @Column(name = "ofr_broker_name")
    private String ofrBrokerName;

    /**
     * 卖方佣金
     */
    @Column(name = "ofr_brokerrage")
    private BigDecimal ofrBrokerrage;

    /**
     * ofr方是否确认
     */
    @Column(name = "ofr_check")
    private Boolean ofrCheck;

    /**
     * 价格
     */
    @Column(name = "price")
    private BigDecimal price;

    /**
     * 交易量
     */
    @Column(name = "volume")
    private BigDecimal volume;

    /**
     * 货币类型 CNY
     */
    @Column(name = "currency")
    private String currency;

    /**
     * 全价
     */
    @Column(name = "full_price")
    private BigDecimal fullPrice;

    /**
     * 净价
     */
    @Column(name = "net_price")
    private BigDecimal netPrice;

    /**
     * 交割日
     */
    @Column(name = "settlement_date")
    private String settlementDate;

    /**
     * 结算方式 DVP(券款对付)
     */
    @Column(name = "delivery_type")
    private String deliveryType;

    /**
     * 债券ID
     */
    @Column(name = "goods_id")
    private String goodsId;

    /**
     * 债券代码
     */
    @Column(name = "goods_code")
    private String goodsCode;

    /**
     * 债券简称
     */
    @Column(name = "goods_short_name")
    private String goodsShortName;

    /**
     * 债券到期日
     */
    @Column(name = "maturity_date")
    private String maturityDate;

    /**
     * 成交单状态, 0-确认，1-待提交，2-已提交，3-已通过，5-未通过，7-已毁单，13-送审中，-1-已删除
     */
    @Column(name = "deal_status")
    private String dealStatus;

    /**
     * 备注
     */
    @Column(name = "description")
    private String description;

    /**
     * 状态位:1-有效 2-无效
     */
    @Column(name = "status")
    private String status;

    /**
     * 成交时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * Bid方是否为过桥机构 "2"-过桥机构， "1"-非过桥机构
     */
    @Column(name = "bid_bridge")
    private String bidBridge;

    /**
     * bid是否收费 "2"-收费，"1"-不收费
     */
    @Column(name = "bid_charge")
    private String bidCharge;

    /**
     * Ofr方是否为过桥机构 "2"-过桥机构， "1"-非过桥机构
     */
    @Column(name = "ofr_bridge")
    private String ofrBridge;

    /**
     * ofr是否收费 "2"-收费，"1"-不收费
     */
    @Column(name = "ofr_charge")
    private String ofrCharge;

    /**
     * 买卖方向, GVN/TKN/TRD
     */
    @Column(name = "deal_type")
    private String dealType;

    /**
     * 组标记
     */
    @Column(name = "group_flag")
    private String groupFlag;

    /**
     * 结算方式 T+0 T+1
     */
    @Column(name = "time_style")
    private String timeStyle;

    /**
     * 确认者帐号
     */
    @Column(name = "confirm_account")
    private String confirmAccount;

    /**
     * 确认时间
     */
    @Column(name = "confirm_date")
    private Date confirmDate;

    /**
     * 买方确认时间
     */
    @Column(name = "bid_check_date")
    private Date bidCheckDate;

    /**
     * 卖方确认时间
     */
    @Column(name = "ofr_check_date")
    private Date ofrCheckDate;

    /**
     * 买方交易员确认
     */
    @Column(name = "bid_trader_check")
    private Boolean bidTraderCheck;

    /**
     * 买方交易员确认时间
     */
    @Column(name = "bid_trader_check_date")
    private Date bidTraderCheckDate;

    /**
     * 卖方交易员确认
     */
    @Column(name = "ofr_trader_check")
    private Boolean ofrTraderCheck;

    /**
     * 卖方交易员确认时间
     */
    @Column(name = "ofr_trader_check_date")
    private Date ofrTraderCheckDate;

    /**
     * 后台信息
     */
    @Column(name = "remarks")
    private String remarks;

    /**
     * 单号
     */
    @Column(name = "odd_numbers")
    private String oddNumbers;

    /**
     * 0-行权 1-到期
     */
    @Column(name = "exercise")
    private String exercise;

    /**
     * 0-未打印 1-已打印
     */
    @Column(name = "is_print")
    private Boolean print;

    /**
     * 返点数值, 比如返0.12
     */
    @Column(name = "return_point")
    private BigDecimal returnPoint;

    /**
     * 利差
     */
    @Column(name = "spread")
    private BigDecimal spread;

    /**
     * 清算速度
     */
    @Column(name = "clear_speed")
    private String clearSpeed;

    /**
     * 交割日
     */
    @Column(name = "delivery_date")
    private Date deliveryDate;

    /**
     * 是否返点 0, 1
     */
    @Column(name = "rebate")
    private String rebate;

    /**
     * 是否内部成交, "1"-非内部成交，“2”-内部成交
     */
    @Column(name = "internally")
    private String internally;

    /**
     * 发送状态
     */
    @Column(name = "send_status")
    private String sendStatus;

    /**
     * 报价类型 收益率/净价/全价/利差
     */
    @Column(name = "quote_type")
    private String quoteType;

    /**
     * 收益率
     */
    @Column(name = "yield")
    private BigDecimal yield;

    /**
     * 债券key
     */
    @Column(name = "bond_key")
    private String bondKey;

    /**
     * 市场代码
     */
    @Column(name = "listed_market")
    private String listedMarket;

    /**
     * 键值加市场唯一标示一个债券
     */
    @Column(name = "bond_key_listed_market")
    private String bondKeyListedMarket;

    /**
     * 债券类型,BCO/BNC/ABS/NCD/BBE
     */
    @Column(name = "bond_category")
    private String bondCategory;

    /**
     * 交易日
     */
    @Column(name = "Traded_Date")
    private String tradedDate;

    /**
     * 序列号
     */
    @Column(name = "sequence_number")
    private String sequenceNumber;

    /**
     * 结算金额
     */
    @Column(name = "total_price")
    private String totalPrice;

    /**
     * bid备注
     */
    @Column(name = "bid_remarks")
    private String bidRemarks;

    /**
     * ofr备注
     */
    @Column(name = "ofr_remarks")
    private String ofrRemarks;

    /**
     * 买方佣金利率
     */
    @Column(name = "bid_brokerage_rate")
    private BigDecimal bidBrokerageRate;

    /**
     * 卖方佣金利率
     */
    @Column(name = "ofr_brokerage_rate")
    private BigDecimal ofrBrokerageRate;

    /**
     * 买方折扣
     */
    @Column(name = "bid_discount")
    private BigDecimal bidDiscount;

    /**
     * 卖方折扣
     */
    @Column(name = "ofr_discount")
    private BigDecimal ofrDiscount;

    /**
     * 更新时间
     */
    @Column(name = "updateTime")
    private Date updateTime;

    /**
     * 加急标志
     */
    @Column(name = "urgent")
    private String urgent;

    /**
     * 买方交易员名字
     */
    @Column(name = "bidBankAgentName")
    private String bidBankAgentName;

    /**
     * 买方经纪人id B
     */
    @Column(name = "bidBrokerIdB")
    private String bidBrokerIdB;

    /**
     * 买方经纪人id C
     */
    @Column(name = "bidBrokerIdC")
    private String bidBrokerIdC;

    /**
     * 买方经纪人id D
     */
    @Column(name = "bidBrokerIdD")
    private String bidBrokerIdD;

    /**
     * 买方经纪人代码 A
     */
    @Column(name = "bidBrokerCodeA")
    private String bidBrokerCodeA;

    /**
     * 买方经纪人代码 B
     */
    @Column(name = "bidBrokerCodeB")
    private String bidBrokerCodeB;

    /**
     * 买方经纪人代码 C
     */
    @Column(name = "bidBrokerCodeC")
    private String bidBrokerCodeC;

    /**
     * 买方经纪人代码 D
     */
    @Column(name = "bidBrokerCodeD")
    private String bidBrokerCodeD;

    /**
     * 买方经纪人比例 A
     */
    @Column(name = "bidPercentA")
    private String bidPercentA;

    /**
     * 买方经纪人比例 B
     */
    @Column(name = "bidPercentB")
    private String bidPercentB;

    /**
     * 买方经纪人比例 C
     */
    @Column(name = "bidPercentC")
    private String bidPercentC;

    /**
     * 买方经纪人比例 D
     */
    @Column(name = "bidPercentD")
    private String bidPercentD;

    /**
     * bid是否免佣 "2"-免佣，"1"-不免佣
     */
    @Column(name = "bidIsNoBrokerage")
    private String bidIsNoBrokerage;

    /**
     * bid佣金备注
     */
    @Column(name = "bidBrokerrageRemark")
    private String bidBrokerrageRemark;

    /**
     * bid方交易方式
     */
    @Column(name = "bidTradeMode")
    private String bidTradeMode;

    /**
     * Bid方NC "1"-NC，"0"-非NC
     */
    @Column(name = "bidNoConfirm")
    private String bidNoConfirm;

    /**
     * Bid方NC备注
     */
    @Column(name = "bidNoComments")
    private String bidNoComments;

    /**
     * 卖方交易员名字
     */
    @Column(name = "ofrBankAgentName")
    private String ofrBankAgentName;

    /**
     * 卖方经纪人id B
     */
    @Column(name = "ofrBrokerIdB")
    private String ofrBrokerIdB;

    /**
     * 卖方经纪人id C
     */
    @Column(name = "ofrBrokerIdC")
    private String ofrBrokerIdC;

    /**
     * 卖方经纪人id D
     */
    @Column(name = "ofrBrokerIdD")
    private String ofrBrokerIdD;

    /**
     * 卖方经纪人代码 A
     */
    @Column(name = "ofrBrokerCodeA")
    private String ofrBrokerCodeA;

    /**
     * 卖方经纪人代码 B
     */
    @Column(name = "ofrBrokerCodeB")
    private String ofrBrokerCodeB;

    /**
     * 卖方经纪人代码 C
     */
    @Column(name = "ofrBrokerCodeC")
    private String ofrBrokerCodeC;

    /**
     * 卖方经纪人代码 D
     */
    @Column(name = "ofrBrokerCodeD")
    private String ofrBrokerCodeD;

    /**
     * 卖方经纪人比例 A
     */
    @Column(name = "ofrPercentA")
    private String ofrPercentA;

    /**
     * 卖方经纪人比例 B
     */
    @Column(name = "ofrPercentB")
    private String ofrPercentB;

    /**
     * 卖方经纪人比例 C
     */
    @Column(name = "ofrPercentC")
    private String ofrPercentC;

    /**
     * 卖方经纪人比例 D
     */
    @Column(name = "ofrPercentD")
    private String ofrPercentD;

    /**
     * ofr是否免佣 "2"-免佣，"1"-不免佣
     */
    @Column(name = "ofrIsNoBrokerage")
    private String ofrIsNoBrokerage;

    /**
     * ofr佣金备注
     */
    @Column(name = "ofrBrokerrageRemark")
    private String ofrBrokerrageRemark;

    /**
     * ofr方交易方式
     */
    @Column(name = "ofrTradeMode")
    private String ofrTradeMode;

    /**
     * ofr方NC "1"-NC，"0"-非NC
     */
    @Column(name = "ofrNoConfirm")
    private String ofrNoConfirm;

    /**
     * ofr方NC备注
     */
    @Column(name = "ofrNoComments")
    private String ofrNoComments;

    /**
     * bid方特别细节
     */
    @Column(name = "specialPartyBid")
    private String specialPartyBid;

    /**
     * ofr方特别细节
     */
    @Column(name = "specialPartyOfr")
    private String specialPartyOfr;

    /**
     * 其他细节
     */
    @Column(name = "specialTerms")
    private String specialTerms;

    /**
     * 后台反馈
     */
    @Column(name = "feedback")
    private String feedback;

    @Column(name = "mkt_type")
    private String mktType;

    /**
     * 最近操作人id
     */
    @Column(name = "oper_id")
    private String operId;

    /**
     * 最近操作人名称
     */
    @Column(name = "oper_name")
    private String operName;

    /**
     * 报价ID集合，以|分隔
     */
    @Column(name = "quote_id")
    private String quoteId;

    /**
     * 创建时间(精确到毫秒)
     */
    @Column(name = "createtime")
    private Date createtime;

    /**
     * 修改时间(精确到毫秒)
     */
    @Column(name = "modifytime")
    private Date modifytime;

    /**
     * 来源 1-idb,2-idc
     */
    @Column(name = "source")
    private String source;

    /**
     * 代付信息，0/1/2/3/4/5
     */
    @Column(name = "payfor")
    private String payfor;

    /**
     * Bid方代付信息，0/1/2/3/4/5
     */
    @Column(name = "bid_payfor")
    private String bidPayfor;

    /**
     * Ofr方代付信息，0/1/2/3/4/5
     */
    @Column(name = "ofr_payfor")
    private String ofrPayfor;

    /**
     * 产品类型
     */
    @Column(name = "abs_type")
    private String absType;

    /**
     * 成交档次
     */
    @Column(name = "abs_grade")
    private String absGrade;

}
